package com.wjw.pojo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
/*@Component
pojo上没有@Component注解时需要在service类或者controller类上
加上注解@EnableConfigurationProperties(Robot.class)
完成属性的自动配置*/
@ConfigurationProperties(prefix = "robot")
public class Robot {
    private String name;
    private String age;
    private String email;
}

